package com.dingyx.ps.model.thirdpart;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * <手机验证码发送参数对象（单条发送）>
 * @author ZhangYang
 * @date 2021/3/23 16:40
 * @version 1.0.0
 */
@Data
@ApiModel("手机验证码发送参数对象（单条发送）")
public class VerifyCodePO {
    @NotBlank(message = "手机号码不能为空")
    @Size(min = 11, max = 11, message = "手机号码错误")
    @ApiModelProperty(value = "手机号码", required = true)
    private String phone;

    @Range(min = 4, max = 8, message = "验证码长度错误，可选范围：4-8")
    @ApiModelProperty(value = "验证码长度，默认4")
    private Integer len = 4;

    @ApiModelProperty(value = "验证码，校验时使用，发送时不传")
    private String code;
}
